// src/pages/task/schedule/components/ScheduleHeader.tsx - 调度页面头部组件
import React from 'react';
import { Button, Space, Typography } from 'antd';
import { PlusOutlined } from '@ant-design/icons';

const { Title } = Typography;

interface ScheduleHeaderProps {
  onAddSchedule: () => void;
}

const ScheduleHeader: React.FC<ScheduleHeaderProps> = ({ onAddSchedule }) => {
  return (
    <div style={{ 
      display: 'flex', 
      justifyContent: 'space-between', 
      alignItems: 'center',
      marginBottom: '16px',
      padding: '16px 0'
    }}>
      <Title level={3} style={{ margin: 0 }}>任务调度</Title>
      <Button 
        type="primary" 
        icon={<PlusOutlined />}
        onClick={onAddSchedule}
      >
        新增
      </Button>
    </div>
  );
};

export default ScheduleHeader;